package thinking.java.initalization.and.clean.up;

/**
 * @author GaoFeng
 * @date 2020/1/2 14:11
 */
public class MethodInit {

    int i = f();

    int f() {
        return 11;
    }

    public static void main(String[] args) {
        // 通过方法来初始化属性的值
        MethodInit methodInit = new MethodInit();
        System.out.println(methodInit.i);

    }
}
